Skip to main content

Python API

Data Unit Description:

Data TypeUnit
PositionDegrees (angular)
VelocityDegrees/second (angular)
CurrentA
TorqueN·m

comm Interface

get_comm_root(server_ip)

The corresponding Python script demo for this function is demo_lookup.py

Function Description:

FunctionGet the basic properties of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueAll basic properties of the corresponding actuator, including serial number, network configuration, etc., type: dict.

get_comm_driver_version(server_ip)

The corresponding Python script demo for this function is demo_comm_driver_firmware_version_get.py

Function Description:

FunctionGet the driver firmware version of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueDriver firmware version of the corresponding actuator, type: str.

get_comm_firmware_version(server_ip)

The corresponding Python script demo for this function is demo_comm_driver_firmware_version_get.py

Function Description:

FunctionGet the communication firmware version of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueCommunication firmware version of the corresponding actuator, type: str.

get_comm_config(server_ip)

The corresponding Python script demo for this function is demo_comm_config_get.py

FunctionGet the config properties of the actuator (will print the actuator's config properties in the terminal)
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_comm_config(server_ip, dict)

The corresponding Python script demo for this function is demo_comm_config_set.py

FunctionSet the actuator's config properties
Parametersserver_ip: actuator IP ,type: str
dict: Config configuration parameters. Details are shown in the table below
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
Config Configuration ParametersTypeDescriptionRecommended Value
namestrActuator name"Name of the currently connected actuator"
DHCP_enableboolWhether to enable DHCP, it is recommended to disable DHCP (when enabled, IP will be automatically assigned)False
SSIDstrWiFi name to connect to, only used for wireless OTA when wired connection is unavailable during OTA upgrade (only V1 actuators support wireless OTA)"WiFi name of available wireless network in current network environment"
passwordstrWiFi password to connect to, only used for wireless OTA when wired connection is unavailable during OTA upgrade (only V1 actuators support wireless OTA)"WiFi password of available wireless network in current network environment"
static_IPlistStatic IP, the actuator's own IPIP address to be set for the currently connected actuator
gatewaylistGateway[192,168,137,1]
subnet_masklistSubnet mask[255,255,255,0]
dns_1listPrimary DNS server address, only used during OTA upgrade[114,114,114,114]
dns_2listSecondary DNS server address, only used during OTA upgrade[8,8,8,8]
dict = {
"name": "FSA-0",
"DHCP_enable": False,
"SSID": "fftai-6",
"password": "fftai2015",
"static_IP": [192, 168, 137, 101],
"gateway": [192, 168, 137, 1],
"subnet_mask": [255, 255, 255, 0],
"dns_1": [114, 114, 114, 114],
"dns_2": [8, 8, 8, 8],
}

broadcast_func()

This function is basically used in all Python scripts.

FunctionBroadcast query all Fourier self-developed devices on the local network
ParametersNone
Return Valueaddress_list: All found Fourier self-developed device IPs, type: list

broadcast_func_with_filter(filter_type)

This function is used in most Python scripts.

FunctionBroadcast query all qualified Fourier self-developed devices on the local network
Parametersfilter_type: Filter actuator category, type: str, options include Actuator, AbsEncoder, CtrlBox.
Return ValueAll found qualified Fourier self-developed device IPs, type: list

set_subscribe(server_ip, cfg_dict)

The corresponding Python script demo for this function is demo_set_subscribe.py

FunctionSubscribe interface, selectively send actuator data to a specified port
Parametersserver_ip: actuator IP ,type: str
cfg_dict: Subscribe configuration parameters, type: dict. Details are shown below
Return ValueNone return value
Subscribe Configuration ParametersTypeDescriptionRecommended Value
portintTarget port number for the actuator to send data to PCPort on the current computer
enableintWhether to send, 0 means not send, 1 means send1
positionintWhether to send position, 0 means not send, 1 means send1
velocityintWhether to send velocity, 0 means not send, 1 means send1
currentintWhether to send current, 0 means not send, 1 means send1
torqueintWhether to send torque, 0 means not send, 1 means send1
errorintWhether to send error code, 0 means not send, 1 means send1
error_ext2intWhether to send extended error code2, 0 means not send, 1 means send1
error_ext3intWhether to send extended error code3, 0 means not send, 1 means send1
error_ext4intWhether to send extended error code4, 0 means not send, 1 means send1
error_ext5intWhether to send extended error code5, 0 means not send, 1 means send1
error_ext6intWhether to send extended error code6, 0 means not send, 1 means send1
error_ext7intWhether to send extended error code7, 0 means not send, 1 means send1
error_ext8intWhether to send extended error code8, 0 means not send, 1 means send1
udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
udp_socket.bind(("", 0))
addr_not_use, port = udp_socket.getsockname()
print("Socket is bound to port:", port)
config = {
"port": port,
"enable": 1,
"position": 1,
"velocity": 1,
"current": 1,
"torque": 1,
"error": 1,
"error_ext2": 1,
"error_ext3": 1,
"error_ext4": 1,
"error_ext5": 1,
"error_ext6": 1,
"error_ext7": 1,
"error_ext8": 1,
}

ota(server_ip)

The corresponding Python script demo for this function is demo_ota.py

FunctionPerform communication OTA upgrade on the actuator, upgrade version is production.
Parametersserver_ip: actuator IP ,type: str
Return ValueNone return value

ota_test(server_ip)

The corresponding Python script demo for this function is demo_ota_test.py

FunctionPerform communication OTA upgrade on the actuator, upgrade version is test.
Parametersserver_ip: actuator IP ,type: str
Return ValueNone return value

ota_devel(server_ip)

The corresponding Python script demo for this function is demo_ota_devel.py

FunctionPerform communication OTA upgrade on the actuator, upgrade version is development.
Parametersserver_ip: actuator IP ,type: str
Return ValueNone return value

ota_cloud(server_ip)

The corresponding Python script demo for this function is demo_ota_cloud.py

FunctionPerform communication OTA upgrade on the actuator, upgrade version is cloud.
Parametersserver_ip: actuator IP ,type: str
Return ValueNone return value

ota_custom(server_ip, version_str)

The corresponding Python script demo for this function is demo_ota_custom.py

FunctionPerform communication OTA upgrade on the actuator, upgrade version is custom.
Parametersserver_ip: actuator IP, type: str
version_str: Version number to upgrade, type: str
Return ValueNone return value

ota_driver(server_ip)

The corresponding Python script demo for this function is demo_ota_driver.py

FunctionPerform driver OTA upgrade on the actuator, upgrade version is production.
Parametersserver_ip: actuator IP, type: str
Return ValueNone return value

ota_driver_test(server_ip)

The corresponding Python script demo for this function is demo_ota_driver_test.py

FunctionPerform driver OTA upgrade on the actuator, upgrade version is test.
Parametersserver_ip: actuator IP, type: str
Return ValueNone return value

ota_driver_devel(server_ip)

The corresponding Python script demo for this function is demo_ota_driver_devel.py

FunctionPerform driver OTA upgrade on the actuator, upgrade version is development.
Parametersserver_ip: actuator IP, type: str
Return ValueNone return value

ota_driver_cloud(server_ip)

The corresponding Python script demo for this function is demo_ota_driver_cloud.py

FunctionPerform driver OTA upgrade on the actuator, upgrade version is cloud.
Parametersserver_ip: actuator IP, type: str
Return ValueNone return value

ota_driver_custom(server_ip ,version_str)

The corresponding Python script demo for this function is demo_ota_driver_custom.py

FunctionPerform driver OTA upgrade on the actuator, upgrade version is custom.
Parametersserver_ip: actuator IP, type: str
version_str: Version number to upgrade, type: str
Return ValueNone return value

ctrl Interface

set_enable(server_ip)

The corresponding Python script demo for this function is demo_enable_set.py

Function Description:

FunctionSet the actuator's enable
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_disable(server_ip)

The corresponding Python script demo for this function is demo_enable_set.py

Function Description:

FunctionSet the actuator's disable
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

clear_fault(server_ip)

The corresponding Python script demo for this function is demo_clear_fault.py

Function Description:

FunctionClear the actuator's error codes
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_calibrate_encoder(server_ip)

The corresponding Python script demo for this function is demo_set_calibrate_encoder.py (Note: During calibration, the actuator will rotate. It is recommended to secure the actuator before calibration)

Function Description:

FunctionSet the actuator mode to calibration mode
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

get_state(server_ip)

Function Description:

FunctionGet the current status of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueCurrent status of the actuator, type: str or empty. Returns "OK" if status is normal, None if abnormal

set_mode_of_operation(server_ip, mode_of_operation)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator's operation mode (position, velocity, current, torque)
Parametersserver_ip: actuator IP ,type: str
mode_of_operation: Actuator operation mode, type: int, options include position, velocity, current, torque
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
mode_of_operation ModesCorresponding int ValueCorresponding Variable in FSAModeOfOperation Class
None mode0NONE
Position mode1POSITION_CONTROL
Velocity mode3VELOCITY_CONTROL
Current mode4CURRENT_CONTROL
Torque mode6TORQUE_CONTROL
Position PD mode7POSITION_CONTROL_PD
# Set Position mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.NONE)
# Set Position mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL)
# Set Velocity mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.VELOCITY_CONTROL)
# Set Current mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.CURRENT_CONTROL)
# Set Torque mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.TORQUE_CONTROL)
# Set Position PD mode
fi_fsa_v2.set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL_PD)

get_pid_param(server_ip)

The corresponding Python script demo for this function is demo_pid_param_get.py

Function Description:

FunctionGet the PID parameters of the actuator (Note: These PID parameters require a restart to take effect)
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_pid_param(server_ip, dict)

The corresponding Python script demo for this function is demo_pid_param_set.py

Function Description:

FunctionSet the PID parameters of the actuator (Note: These PID parameters require a restart to take effect)
Parametersserver_ip: actuator IP ,type: str
dict: PID parameters, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
PID Parameter Specific ConfigurationDescriptionType
control_position_kpPosition loop Kpfloat
control_velocity_kpVelocity loop Kpfloat
control_velocity_kiVelocity loop Kifloat
control_current_kpCurrent loop Kpfloat
control_current_kiCurrent loop Kifloat
control_PD_kpPD mode Kpfloat
control_PD_kdPD mode Kdfloat
  dict = { 
"control_position_kp": 0.5,
"control_velocity_kp": 0.0025,
"control_velocity_ki": 0.00001,
"control_PD_kp": 1.0,
"control_PD_kd": 1.0,
}

get_pid_param_imm(server_ip)

The corresponding Python script demo for this function is demo_pid_param_imm_get.py

Function Description:

FunctionGet the temporary PID parameters of the actuator (Note: These PID parameters take effect immediately, but will not be saved after power off)
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_pid_param_imm(server_ip, dict)

The corresponding Python script demo for this function is demo_pid_param_imm_set.py

Function Description:

FunctionSet the temporary PID parameters of the actuator (Note: These PID parameters take effect immediately, but will not be saved after power off)
Parametersserver_ip: actuator IP ,type: str
dict: PID parameters, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
PID Parameter Specific ConfigurationDescriptionType
control_position_kp_immTemporary position loop Kpfloat
control_velocity_kp_immTemporary velocity loop Kpfloat
control_velocity_ki_immTemporary velocity loop Kifloat
control_PD_kp_immTemporary PD mode Kpfloat
control_PD_kd_immTemporary PD mode Kdfloat
dict = { 
"control_position_kp_imm": 0.0,
"control_velocity_kp_imm": 0.1,
"control_velocity_ki_imm": 0.001,
"control_PD_kp_imm": 1.0,
"control_PD_kd_imm": 1.0,
}

get_control_param(server_ip)

The corresponding Python script demo for this function is demo_control_param_get.py

Function Description:

FunctionGet the control parameters of the actuator (Note: These control parameters require a restart to take effect)
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_control_param(server_ip, dict)

⚠️ Note: This function is temporarily unavailable

The corresponding Python script demo for this function is demo_control_param_set.py

Function Description:

FunctionSet the control parameters of the actuator (Note: These control parameters require a restart to take effect)
Parametersserver_ip: actuator IP ,type: str
dict: Control parameters, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
Control Parameter Specific ConfigurationDescriptionType
motor_max_speedMaximum speed of the actuatorint
motor_max_accelerationMaximum acceleration of the actuatorint
motor_max_currentMaximum current of the actuatorint
            dict = {
"motor_max_speed": 3000,
"motor_max_acceleration": 60000,
"motor_max_current": 8,
}

get_control_param_imm(server_ip)

The corresponding Python script demo for this function is demo_control_param_imm_get.py

Function Description:

FunctionGet the temporary control parameters of the actuator (Note: These parameters take effect immediately, but will not be saved after power off)
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_control_param_imm(server_ip, dict)

⚠️ Note: This function is temporarily unavailable

The corresponding Python script demo for this function is demo_control_param_imm_set.py

Function Description:

FunctionSet the temporary control parameters of the actuator (Note: These parameters take effect immediately, but will not be saved after power off)
Parametersserver_ip: actuator IP ,type: str
dict: Control parameters, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
Control Parameter Specific ConfigurationDescriptionType
motor_max_speed_immMaximum speed of the actuator (temporary, lost after power off)int
motor_max_acceleration_immMaximum acceleration of the actuator (temporary, lost after power off)int
motor_max_current_immMaximum current of the actuator (temporary, lost after power off)int
            dict = {
"motor_max_speed_imm": 3000,
"motor_max_acceleration_imm": 60000,
"motor_max_current_imm": 8,
}

get_flag_of_operation(server_ip)

The corresponding Python script demo for this function is demo_flag_of_operation_get.py

Function Description:

FunctionGet the actuator's operation flag
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_flag_of_operation(server_ip, dict_cfg)

The corresponding Python script demo for this function is demo_flag_of_operation_set.py

Function Description:

FunctionSet the operation flags of the actuator
Parametersserver_ip: actuator IP ,type: str
dict_cfg: Operation flags, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
Operation Flag ConfigurationDescriptionType
flag_do_use_store_motor_paramWhether to enable configuration parameters, 1 means enable, 0 means disableint
flag_do_use_store_pid_paramWhether to enable PID parameters, 1 means enable, 0 means disableint
actuator_double_encoder_enableWhether to enable dual encoder function, 1 means enable, 0 means disableint
 dict_cfg = {
"flag_do_use_store_motor_param": 1,
"flag_do_use_store_pid_param": 0,
"actuator_double_encoder_enable": 1,
}

get_config(server_ip)

The corresponding Python script demo for this function is demo_ctrl_config_get.py

Function Description:

FunctionGet the actuator's configuration information
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the operation was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

set_config(server_ip, dict)

The corresponding Python script demo for this function is demo_ctrl_config_set.py

Function Description:

FunctionSet the configuration information of the actuator
Parametersserver_ip: actuator IP ,type: str
dict: Actuator configuration information, type: dict
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
Actuator Configuration InformationDescriptionType
actuator_directionActuator directionint
actuator_reduction_ratioReduction ratiofloat
motor_typeMotor modelunsigned int
motor_hardware_typeDriver board modelunsigned int
motor_directionMotor rotation directionint
motor_max_speedMotor maximum speedfloat
motor_max_accelerationMotor maximum accelerationfloat
motor_max_currentMotor current limitfloat
actuator_comm_hardware_typeCommunication board modelint
Actuator Direction ValuesDescription
1Forward (clockwise)
-1Reverse (counterclockwise)
Motor Model ValuesDescription
0MOTOR_NULL (None model)
725_08V0
636_08V0
836_10V0
560_08V0
480_10V0
3100_15V0
2130_20V0
1345_15V1
1260_08V1
1180_10V1
10100_15V1
9130_20V1
Driver Board Model ValuesDescription
0HARDWARE_NULL (None model)
2H95V104
3H66V104
4H46V104
5H30V303
7H54V100
8H66V106
9H88V100
10H106V100
11H142V100
12H142V102
13H66V202
16H100V100
17H58V100
Motor Direction ValuesDescription
1Forward (clockwise)
-1Reverse (counterclockwise)
Communication Board ModelDescription
0NULL (None version)
1V1
2V2
 cfg_dict = {
'actuator_direction': 1,
'actuator_reduction_ratio': 31,
'motor_type': 7,
'motor_hardware_type': 5,
'motor_direction': 1,
"motor_max_speed": 3000,
"motor_max_acceleration": 60000,
'motor_max_current': 60,
"actuator_comm_hardware_type": 2,
"actuator_double_encoder_enable": 0
}

reboot(server_ip)

The corresponding Python script demo for this function is demo_reboot.py

Function Description:

FunctionReboot the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueWhether the reboot was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.

get_error_code(server_ip)

The corresponding Python script demo for this function is demo_get_error.py

Function Description:

FunctionGet the error code of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSpecific error code, return type: int or list or None. Returns None on failure, return type is int when there is one error code, return type is list when there are multiple error codes.

get_pvc(server_ip)

The corresponding Python script demo for this function is demo_get_pvc.py

Function Description:

FunctionGet the position, velocity, and current information of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSpecific position, velocity, and current information, return type is tuple, return values in order are position, velocity, current.

get_foc_target_PVC(server_ip)

The corresponding Python script demo for this function is demo_get_foc_target_PVC.py

Function Description:

FunctionGet the target position, target velocity, and target current information of the actuator FOC execution
Parametersserver_ip: actuator IP ,type: str
Return ValueSpecific target position, target velocity, and target current information of FOC execution, return type is tuple, return values in order are position, velocity, current.

get_pvct(server_ip)

The corresponding Python script demo for this function is demo_get_pvct.py

Function Description:

FunctionGet the current position, velocity, current, and torque information of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSpecific position, velocity, current, and torque information of FOC execution, return type is tuple, return values in order are position, velocity, current, torque.

get_fsa_abs_position(server_ip) 

The corresponding Python script demo for this function is demo_get_fsa_abs_position.py

Function Description:

FunctionGet the absolute encoder position information of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueAbsolute encoder position information, type: float.

set_fsa_abs_zero(server_ip)

The corresponding Python script demo for this function is demo_set_fsa_abs_zero.py

Function Description:

FunctionSet the zero point of the actuator's absolute encoder, using the current position as the zero point.
Parametersserver_ip: actuator IP ,type: str
Return ValueReturns True on success, returns error code on failure.

set_eth_recovery(server_ip)

The corresponding Python script demo for this function is demo_set_eth_recovery.py

Function Description:

FunctionRecover the actuator's network
Parametersserver_ip: actuator IP ,type: str
Return ValueReturns True on success, returns error code on failure.

set_eth_timeout_protect(server_ip, is_enable, timeout_interval)Not available in low versions

The corresponding Python script demo for this function is demo_set_eth_timeout_protect.py

Function Description:

FunctionSet the network timeout protection of the actuator
Parametersserver_ip: actuator IP ,type: str
is_enable: Whether to enable network timeout protection, type: int, 0 means disable, 1 means enable
timeout_interval: Timeout detection time, unit: milliseconds, type: int
Return ValueReturns True on success, returns error code on failure.

set_control_loop_freq_div(server_ip, position_loop_freq_div, velocity_loop_freq_div, PD_loop_freq_div)Not available in low versions

The corresponding Python script demo for this function is demo_set_control_loop_freq_div.py

Function Description:

FunctionDivide the actuator's control frequency by a specific value to modify the actual control frequency
Parametersserver_ip: actuator IP ,type: str
position_loop_freq_div: Specific value to divide the position control frequency in Position mode, type: float
velocity_loop_freq_div: Specific value to divide the velocity control frequency in Velocity mode, type: float
PD_loop_freq_div: Specific value to divide the position control frequency in PD Position mode, type: float
Return ValueReturns True on success, returns error code on failure.

set_torque_limit_max(server_ip, torque_limit_max)

The corresponding Python script demo for this function is demo_set_torque_limit_max.py

Function Description:

FunctionSet the maximum torque of the actuator
Parametersserver_ip: actuator IP ,type: str
torque_limit_max: Maximum torque of the actuator, type: float
Return ValueReturns True on success, returns error code on failure.

set_inertia_ff(server_ip, inertia_ff)

The corresponding Python script demo for this function is demo_set_inertia_ff.py

Function Description:

FunctionSet the inertia compensation of the actuator
Parametersserver_ip: actuator IP ,type: str
inertia_ff: Inertia compensation of the actuator, type: float
Return ValueReturns True on success, returns error code on failure.

get_ntc_temperature(server_ip)

The corresponding Python script demo for this function is demo_get_ntc_temperature.py

Function Description:

FunctionGet the winding temperature and MOS temperature of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueReturns winding temperature and MOS temperature. Type is tuple, first is MOS temperature, second is winding temperature.

set_position_control(server_ip, position, velocity_ff=0.0, current_ff=0.0)

This function has no corresponding Python script.

Function Description:

FunctionSet the target position of the actuator in Position mode
Parametersserver_ip: (required) actuator IP ,type: str
position: (required)Target position of the actuator, type: float
velocity_ff: (optional)Velocity loop feedforward of the actuator, type: float, default value is 0.0
current_ff: (optional)Position loop feedforward of the actuator, type: float, default value is 0.0
Return ValueReturns current velocity, position, current on success, returns None on failure

set_velocity_control(server_ip, velocity, current_ff=0.0)

This function has no corresponding Python script.

Function Description:

FunctionSet the target velocity of the actuator in Velocity mode
Parametersserver_ip: (required) actuator IP ,type: str
velocity: (required)Target velocity of the actuator, type: float
current_ff: (optional)Current feedforward of the actuator, type: float, default value is 0.0
Return ValueReturns current velocity, position, current on success, returns None on failure

set_current_control(server_ip, current)

This function has no corresponding Python script.

Function Description:

FunctionSet the target current of the actuator in Current mode
Parametersserver_ip: (required) actuator IP ,type: str
current: (required)Target current of the actuator, type: float
Return ValueReturns current velocity, position, current on success, returns None on failure

set_torque_control(server_ip, torque)

This function has no corresponding Python script.

Function Description:

FunctionSet the target torque of the actuator in Torque mode
Parametersserver_ip:(required) actuator IP ,type: str
torque:(required)Target torque of the actuator, type: float
Return ValueReturns current velocity, position, current on success, returns None on failure

fast Interface

fast_set_enable(server_ip)

The corresponding Python script demo for this function is demo_fast_set_enable.py

Function Description:

FunctionSet the enable of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_enable(server_ip, cnt)

The corresponding Python script demo for this function is demo_fast_set_ack_enable.py

Function Description:

FunctionEnable the actuator and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_disable(server_ip)

The corresponding Python script demo for this function is demo_fast_set_disable.py

Function Description:

FunctionSet the actuator's disable
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_disable(server_ip, cnt)

The corresponding Python script demo for this function is demo_fast_set_ack_disable.py

Function Description:

FunctionDisable the actuator and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means successful, returns None on timeout

fast_set_clear_fault(server_ip)

The corresponding Python script demo for this function is demo_fast_set_clear_fault.py

Function Description:

FunctionClear the error code of the actuator driver
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_clear_fault(server_ip, cnt)

The corresponding Python script demo for this function is demo_fast_set_ack_clear_fault.py

Function Description:

FunctionClear the error code of the actuator driver and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_position_mode(server_ip)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to position control mode
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_position_mode(server_ip, cnt)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to position control mode and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_velocity_mode(server_ip)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to velocity control mode
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_velocity_mode(server_ip, cnt)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to velocity control mode and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_torque_mode(server_ip)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to torque control mode
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_torque_mode(server_ip, cnt)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to torque control mode and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_current_mode(server_ip)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to current control mode
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_current_mode(server_ip, cnt)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to current control mode and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_pd_mode(server_ip)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to PD control mode
Parametersserver_ip: actuator IP ,type: str
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_pd_mode(server_ip, cnt)

This function has no corresponding Python script.

Function Description:

FunctionSet the actuator to PD control mode and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_mode_of_operation(server_ip, mode_of_operation)

This function has no corresponding Python script.

Function Description:

FunctionSet the operation mode of the actuator (position, velocity, current, torque, PD)
Parametersserver_ip: actuator IP ,type: str
mode_of_operation: Actuator operation mode, type: int, options include position, velocity, current, torque, PD
Return ValueWhether the setting was successful, returns FSAFunctionResult.SUCCESS on success, None on failure.
mode_of_operation ModesCorresponding int ValueCorresponding Variable in FSAModeOfOperation Class
None mode0NONE
Position mode1POSITION_CONTROL
Velocity mode3VELOCITY_CONTROL
Current mode4CURRENT_CONTROL
Torque mode6TORQUE_CONTROL
Position PD mode7POSITION_CONTROL_PD
# Set Position mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.NONE)
# Set Position mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL)
# Set Velocity mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.VELOCITY_CONTROL)
# Set Current mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.CURRENT_CONTROL)
# Set Torque mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.TORQUE_CONTROL)
# Set Position PD mode
fi_fsa_v2.fast_set_mode_of_operation(server_ip_list[i], fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL_PD)

fast_set_ack_mode_of_operation(server_ip, tx_cnt, mode_of_operation)

This function has no corresponding Python script.

Function Description:

FunctionSet the operation mode of the actuator (position, velocity, current, torque, PD) and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
tx_cnt: Counter value for asynchronous communication
mode_of_operation: Actuator operation mode, type: int, options include position, velocity, current, torque, PD
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout
mode_of_operation ModesCorresponding int ValueCorresponding Variable in FSAModeOfOperation Class
None mode0NONE
Position mode1POSITION_CONTROL
Velocity mode3VELOCITY_CONTROL
Current mode4CURRENT_CONTROL
Torque mode6TORQUE_CONTROL
Position PD mode7POSITION_CONTROL_PD
# Set Position mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.NONE)
# Set Position mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL)
# Set Velocity mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.VELOCITY_CONTROL)
# Set Current mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.CURRENT_CONTROL)
# Set Torque mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.TORQUE_CONTROL)
# Set Position PD mode
fi_fsa_v2.fast_set_ack_mode_of_operation(server_ip_list[i], tx_cnt, fi_fsa_v2.FSAModeOfOperation.POSITION_CONTROL_PD)

fast_set_position_control(server_ip, position, velocity_ff=0, current_ff=0)

This function has no corresponding Python script.

Function Description:

FunctionSet the target position of the actuator in Position mode
Parametersserver_ip:(required) actuator IP ,type: str
position: (required)Target position of the actuator, type: float
velocity_ff: (optional)Velocity loop feedforward of the actuator, type: float, default value is 0.0
current_ff: (optional)Position loop feedforward of the actuator, type: float, default value is 0.0
Return ValueFSAFunctionResult.SUCCESS

fast_set_velocity_control(server_ip, velocity, current_ff=0)

This function has no corresponding Python script.

Function Description:

FunctionSet the target velocity of the actuator in Velocity mode
Parametersserver_ip: (required) actuator IP ,type: str
velocity: (required)Target velocity of the actuator, type: float
current_ff: (optional)Current feedforward of the actuator, type: float, default value is 0.0
Return ValueFSAFunctionResult.SUCCESS

fast_set_current_control(server_ip, current)

This function has no corresponding Python script.

Function Description:

FunctionSet the target current of the actuator in Current mode
Parametersserver_ip: (required) actuator IP ,type: str
current: (required)Target current of the actuator, type: float
Return ValueFSAFunctionResult.SUCCESS

fast_set_pd_control(server_ip, position, velocity_ff=0, current_ff=0)

The corresponding Python script demo for this function is demo_fast_set_pd_position.py

Function Description:

FunctionSet the target position of the actuator in Position mode
Parametersserver_ip: (required) actuator IP ,type: str
position: (required)Target position of the actuator, type: float
velocity_ff: (optional)Velocity loop feedforward of the actuator, type: float, default value is 0.0
current_ff: (optional)Position loop feedforward of the actuator, type: float, default value is 0.0
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_pd_control(server_ip, cnt, position, velocity_ff=0, current_ff=0)

The corresponding Python script demo for this function is demo_fast_set_ack_pd_position.py

Function Description:

FunctionSet the target position of the actuator in Position mode and return cnt counter value and execution result
Parametersserver_ip: (required) actuator IP ,type: str
cnt: Counter value for asynchronous communication
position: (required)Target position of the actuator, type: float
velocity_ff: (optional)Velocity loop feedforward of the actuator, type: float, default value is 0.0
current_ff: (optional)Position loop feedforward of the actuator, type: float, default value is 0.0
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_pid_imm(server_ip, position_kp, velocity_kp, velocity_ki)

The corresponding Python script demo for this function is demo_fast_set_pid_imm.py

Function Description:

FunctionSet temporary PID parameters for the actuator
Parametersserver_ip: actuator IP ,type: str
position_kp: Actuator three-loop control position loop Kp, type: float
velocity_kp: Actuator three-loop control velocity loop Kp, type: float
velocity_ki: Actuator three-loop control velocity loop Ki, type: float
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_pid_imm(server_ip, cnt, position_kp, velocity_kp, velocity_ki)

The corresponding Python script demo for this function is demo_fast_set_ack_pid_imm.py

Function Description:

FunctionSet temporary PID parameters for the actuator and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
position_kp: Actuator three-loop control position loop Kp, type: float
velocity_kp: Actuator three-loop control velocity loop Kp, type: float
velocity_ki: Actuator three-loop control velocity loop Ki, type: float
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_pd_imm(server_ip, kp, kd)

The corresponding Python script demo for this function is demo_fast_set_pd_imm.py

Function Description:

FunctionSet temporary PD parameters for the actuator
Parametersserver_ip: actuator IP ,type: str
kp: Actuator PD control position loop Kp, type: float
kd: Actuator PD control velocity loop Kd, type: float
Return ValueFSAFunctionResult.SUCCESS

fast_set_ack_pd_imm(server_ip, cnt, kp, kd)

The corresponding Python script demo for this function is demo_fast_set_ack_pd_imm.py

Function Description:

FunctionSet temporary PD parameters for the actuator and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
kp: Actuator PD control position loop Kp, type: float
kd: Actuator PD control velocity loop Kd, type: float
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_control_loop_freq_div(server_ip, position_loop_freq_div, velocity_loop_freq_div, PD_loop_freq_div)

The corresponding Python script demo for this function is demo_fast_set_control_loop_freq_div.py

Function Description:

FunctionSet the loop control frequency division coefficient of the actuator
Parametersserver_ip: actuator IP ,type: str
position_loop_freq_div: Position loop control frequency division coefficient, type: float
velocity_loop_freq_div: Velocity loop control frequency division coefficient, type: float
PD_loop_freq_div: PD control frequency division coefficient, type: float
Return ValueSuccessfully output the received UDP packet, output None on failure

fast_set_ack_control_loop_freq_div(server_ip, cnt, position_loop_freq_div, velocity_loop_freq_div, PD_loop_freq_div)

The corresponding Python script demo for this function is demo_fast_set_ack_control_loop_freq_div.py

Function Description:

FunctionSet the loop control frequency division coefficient of the actuator and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
position_loop_freq_div: Position loop control frequency division coefficient, type: float
velocity_loop_freq_div: Velocity loop control frequency division coefficient, type: float
PD_loop_freq_div: PD control frequency division coefficient, type: float
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_friction_FFD(server_ip, SET, DeadSpeedK, DeadSpeed, Fs, Fc, B, percent):

The corresponding Python script demo for this function is demo_fast_set_friction_FFD.py 

Function Description:

FunctionSet actuator friction compensation
Parametersserver_ip: actuator IP ,type: str
SET: Whether to enable friction compensation, type: uint32
DeadSpeedK: Dead zone slope, type: float
DeadSpeed: Dead zone speed, type: float
Fs: Static friction, type: float
Fc: Coulomb friction, type: float
B: Viscous friction coefficient, type: float
percent: Effective multiple, range 0~2, type: float
Return ValueSuccessfully output the received UDP packet, output None on failure

fast_set_ack_friction_FFD(server_ip, cnt, SET, DeadSpeedK, DeadSpeed, Fs, Fc, B, percent)

The corresponding Python script demo for this function is demo_fast_set_ack_friction_FFD.py 

Function Description:

FunctionSet actuator friction compensation and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
SET: Whether to enable friction compensation, type: uint32
DeadSpeedK: Dead zone slope, type: float
DeadSpeed: Dead zone speed, type: float
Fs: Static friction, type: float
Fc: Coulomb friction, type: float
B: Viscous friction coefficient, type: float
percent: Effective multiple, range 0~2, type: float
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_ack_setpvc_timeout_protect(server_ip, cnt, protect_enable, timeout_ms, protect_mode_of_operation, close_back_last_mode_of_operation, ignore_set_mode_of_operation)

The corresponding Python script demo for this function is demo_fast_set_ack_setpvc_timeout_protect.py 

Function Description:

FunctionSet actuator setpvc timeout protection and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
protect_enable: Whether to enable setpvc timeout protection, 0 disable, 1 enable, type: uint32
timeout_ms: Timeout time, in milliseconds, type: uint32
protect_mode_of_operation: Set whether to use three-loop position control or PD control when entering protection state, optional FSAModeOfOperation.POSITION_CONTROL, FSAModeOfOperation.POSITION_CONTROL_PD, type: uint32
close_back_last_mode_of_operation: If the function is disabled and currently in protection state, whether to restore to the operation mode before entering protection state, 0: do not restore, 1: restore, type: uint32
ignore_set_mode_of_operation: Whether to prohibit modifying mode_of_operation after entering protection mode, 0: do not prohibit, 1: prohibit, type: uint32
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_ack_interface_filter_fc(server_ip, cnt, position, velocity, current)

The corresponding Python script demo for this function is demo_fast_set_ack_interface_filter_fc.py 

Function Description:

FunctionSet the filter cutoff frequency of the actuator feedback pvc and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
position: Set position feedback filter cutoff frequency, type: float
velocity: Set velocity feedback filter cutoff frequency, type: float
current: Set current and torque feedback filter cutoff frequency, type: float
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_set_ack_setpvc_protect_clear(server_ip, cnt, clear_back_last_mode_of_operation)

The corresponding Python script demo for this function is demo_fast_set_ack_setpvc_protect_clear.py 

Function Description:

FunctionClear actuator setpvc protection status and return cnt counter value and execution result
Parametersserver_ip: actuator IP ,type: str
cnt: Counter value for asynchronous communication
close_back_last_mode_of_operation: Whether to restore to the operation mode before entering protection state when clearing protection status, 0: do not restore, 1: restore, type: uint32
Return ValueReturns cnt counter value and res execution result if not timeout, res=0 means enable successful, returns None on timeout

fast_get_pvc(server_ip)

The corresponding Python script demo for this function is demo_fast_get_pvc.py 

Function Description:

FunctionGet the current position, velocity, and current information of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output actuator position, velocity, and current information, output None on failure

fast_get_foc_target_pvc(server_ip)

The corresponding Python script demo for this function is demo_fast_get_foc_target_pvc.py 

Function Description:

FunctionGet the target position, velocity, and current information of the actuator's underlying FOC
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output the target position, velocity, and current information of the underlying FOC, output None on failure

fast_get_pvct(server_ip)

The corresponding Python script demo for this function is demo_fast_get_pvct.py 

Function Description:

FunctionGet the current position, velocity, current, and torque information of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output the current position, velocity, current, and torque information of the actuator, output None on failure

fast_get_error(server_ip)

The corresponding Python script demo for this function is demo_fast_get_error.py 

Function Description:

FunctionGet the error code of the actuator
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output the actuator error code, output None on failure

fast_get_pvct_error(server_ip)

The corresponding Python script demo for this function is demo_fast_get_pvct_error.py 

Function Description:

FunctionGet actuator position, velocity, current, torque, and error code
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output actuator position, velocity, current, torque, and error code, output None on failure

fast_get_friction_FFD(server_ip)

The corresponding Python script demo for this function is demo_fast_get_friction_FFD.py 

Function Description:

FunctionGet actuator friction compensation parameters
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output whether friction compensation is enabled, dead zone slope, dead zone speed, static friction, Coulomb friction, viscous friction coefficient, effective multiple, output None on failure

fast_get_ntc_temp(server_ip)

The corresponding Python script demo for this function is demo_fast_get_ntc_temp.py 

Function Description:

FunctionGet actuator MOS and winding temperature
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output actuator MOS and winding temperature, output None on failure

fast_get_vbus(server_ip)

The corresponding Python script demo for this function is demo_fast_get_vbus.py 

Function Description:

FunctionGet actuator bus voltage
Parametersserver_ip: actuator IP ,type: str
Return ValueSuccessfully output actuator bus voltage, output None on failure

subscribe Interface

The corresponding Python script function for this interface is set_subscribe(server_ip, cfg_dict)